from django.db.models.lookups import Transform
from rest_framework.decorators import api_view
from rest_framework.response import Response
from student.models import StudentData

@api_view(["POST"])
def import_exam_img(request):
    paths = request.FILES.getlist("files",None)
    leng = len(paths)
    if not paths:
        return Response({
            "result":False,
            "message":"请求参数paths错误",
            "code":400001
        })
    StudentData.objects.input_exam_img_path(paths)
    return Response({
        "result":True,
        "code":0,
        "message":"ok"
    })
